<template>
  <div class="main">
    <div id="poster">
      <li style="width: 100%" v-for="(l,i) in poster" :key="i">
        <div class="gotoOther" >
          <img class="poster-pic" :src="l.img" lazy="loaded" />
        </div>
      </li>
    </div>
  </div>
</template>
<script>
import axios from "axios";
export default {
  data() {
    return {
      n: 0,
      poster: "",
    };
  },
  mounted() {
    this.n = this.$route.query.num * 1;
    
    axios({
      method: "get",
      url: "http://localhost:3200/data",
    }).then((data) => {
      var banner = data.data.indexBanner[this.n-1];
      console.log(banner);
      this.poster = banner.aggregation_poster.module[0].detail;
      console.log(this.poster);
    });
  },
};
</script>
<style lang="scss" scoped>
.main {
  width: 100%;
  height: 100%;
  overflow: auto;
  li{
    list-style: none;
  }
  img{
    width: 100%;
    height: 100%;
  }
}
</style>